<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>购物车</title>
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_1893347_im1fp7l603.css">
    <link rel="stylesheet" href="/css/shopping.css">
</head>
<body>
    <!-- 头部导航 -->
    <header></header>
    <!-- 购物车部分 -->
    <section class="shopping" id="shoppingCart">
        <table>
            <span>我的购物车</span>
            <thead class="nav_shop">
                <tr>
                    <th >
                        <label for="all-check" id ="all_check">全选</label>
                        <input type="checkbox" id="all-check">
                    </th>
                    <th >商品名称</th>
                    <th >购买数量</th>
                    <th >单价</th>
                    <th >小计</th>
                    <th >操作</th>
                </tr>
            </thead>
            <tbody id="cartBody">
            </tbody>

        </table>
        <script type="text/html" id='cartBodyTemplate'>
            {{each items item}}
                <tr data-id='{{item.id}}''>
                    <td><input type="checkbox" name="" id="" class="checks" {{ item.checked && 'checked' }}></td>
                    <td>
                        <img src="{{item.pic1}}" alt="">
                        <span>{{item.title}}</span>
                    </td>
                    <td>
                        <div class="changeNum">
                            <div class="sub">-</div>
                            <i class="addCartNum">{{item.count}}</i>
                            <div class="plus">+</div>
                        </div>
                    </td>
                    <td><span>￥{{item.price}}</span></td>
                    <td><span>￥{{item.count*item.price}}</span></td>
                    <td><button class="delete">删除</button></td>
                </tr>
            {{/each}}
        </script>
        <div class="shop_submit">
            
                <div>
                    <i class="iconfont icon-gouwuche continue" id="continue">继续购物</i>
                    
                </div>
                <div>
                    <span>商品应付金额：</span>
                    <em>￥</em>
                    <span id="Paymoney" class="paymoney">0</span>
                </div>
                <div class="submit-btn">
                    <button>去结算</button>
                </div>
            
          </div>
    </section>
    <!-- 空购物车部分 -->
    <section class="empty" id="empty">
        <img src="../images/shopping/empty.png" alt="">
        <span>购物车竟然是空的，快去逛逛吧</span>
        <button id="gotoMall">去商城</button>
    </section>
    <!-- 保障部分 -->
    <section class="protect"></section>
    <!-- 尾部部分 -->
    <footer></footer>
</body>
<script src="/libs/require/require.min.js" data-main="/js/shopping"></script>
</html>